package algs;


public class QuickSort

{

	static int[] numbers = {6,5,3,};//1,8,7,2,4

	public static void main(String[] args)

	{

		int start = numbers[0];
		int end = numbers[numbers.length-1];
		for(int i = 0; i < numbers.length; i++ )
			System.out.print(numbers[i] + ", ");
		numbers = qucksort(numbers, start, end, start);
		System.out.println("===========================");
		for(int i = 0; i < numbers.length; i++ )
			System.out.print(numbers[i] + ", ");

	}


	private static int[] qucksort(int[] numbers2, int start, int end, int pivot)
	{
		 
		for(int i = pivot + 1, j = end-1; i <= j; i++)
		{
			if(i == j)
			{
				swap(pivot, i -1);
			}
		}
		

		return numbers;


	}


	private static void swap(int pivot, int i) 
	{
		int temp = numbers[pivot];
		numbers[pivot] = numbers[i];
		numbers[i] = temp; 
	}

}